package com.sy.structural.flyweight;

public class Waiters extends AbstractWaiterFlyWeight{

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Waiters(String name) {
        this.name = name;
    }

    @Override
    void service() {
        System.out.println("正在服务");
        canService = false;
    }

    @Override
    void end() {
        System.out.println("服务结束 五星好评谢谢啦");
        canService = true;
    }
}
